import { Component } from 'vue';

export type itemType ='radio' | 'checkbox' | 'select' | 'input' | 'textarea' | undefined

// 定义具体的 form 类型
export interface Form {
  name: string;
  gender: string;
  birthDate: string;
  age: string;
  nationality: string;
  ethnicity: string;
  birthWeight: string;
  admissionWeight: string;
  birthPlace: string;
  nativePlace: string;
  idCard: string;
  occupation: string;
  maritalStatus: string;
  marital: string;
}

export interface FormItem {
  label: string;
  field: string;
  component: Component; // 明确 component 是 Vue 组件类型
  type?: itemType;
  span?: number;
  props?: any;
  placeholder?: string;
  change?: () => void;
  onChange?: () => void;
  slots?: any;
  visible?: any;
  dependsOn?: Array<keyof Form>;
  events?: any;
}

export interface Option {
  label: string;
  value: string;
}

export interface FormOptions {
  gender: Option[];
  marital: Option[];
  patientSource: Option[];
  admissionWay: Option[];
}
